Repository navigation
feat(vartalaap): add livekit-plugins-vartalaap TTS plugin - #8446
Closed
roshanpuru wants to merge 3 commits into
Closed
roshanpuru wants to merge 3 commits into
roshanpuru wants to merge 3 commits into
Conversation
Vartalaap is a Hinglish and Indian-language TTS API. The plugin synthesises over POST /v1/tts (ChunkedStream, the chunked PCM body forwarded as it arrives) and streams over a pooled WS /v1/tts/stream (SynthesizeStream): text is cut into sentences as the LLM produces it, every sentence is sent as its own utterance and the server serves them in order, so the next sentence is synthesised while the current one plays. Every server parameter (voice, expression, digits, speed, temperature, seed, postfx, profile, raw) is a constructor option and an update_options keyword; prewarm() opens the socket ahead of the first turn; handshake errors never carry the key. Unit tests cover the request body, option validation, key redaction, in-order playback with stale pooled-socket leftovers dropped, and retryable vs non-retryable server errors. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ence An error event tagged with another utterance's request_id (a pooled-socket leftover) no longer fails the current stream; untagged errors still do. SynthesizeStream reads the owning TTS's options when it sends each sentence, so update_options() between two sentences applies to the next one on the same socket. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… before applying, expire sockets by lifetime - the receive loop wakes when the sender finishes with nothing pending, instead of waiting for a server message that never comes (a turn whose last sentence ended before the LLM closed the input would otherwise hit the receive timeout) - update_options validates a copy and assigns it only on success - pooled sockets expire 5 min after they were opened, not 5 min after their last reuse Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
|
Superseded by #8448: same commits, now opened from the vartalaap-si organisation fork. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
livekit-plugins-vartalaap, a TTS plugin for Vartalaap, a Hinglish and Indian-language text-to-speech API (24 kHz pcm16, first audio after the first 80 ms frame).ChunkedStream(synthesize()):POST /v1/tts, the chunked PCM body is forwarded as it arrives.SynthesizeStream(stream()): a pooledWS /v1/tts/streamconnection (utils.ConnectionPool, 5 min sessions,prewarm()). Text is cut into sentences as it is pushed (tokenize.basic.SentenceTokenizer, which ends sentences on the Devanagari danda too) and every sentence is sent at once as its own utterance; the server serves them in order and streams each one's audio back, so the next sentence is synthesised while the current one plays. Events and audio of other utterances left on a pooled socket are ignored.update_options()keyword:voice,expression(the API'sstyle),digits,speed,temperature,seed,postfx,profile,raw; they travel in each utterance's body, so updates apply from the next sentence without reconnecting.503(busy,Retry-After) and5xxare retryableAPIStatusErrors,4xxare not; handshake errors never carry the key.tests/test_plugin_vartalaap_tts.py(pytest.mark.plugin("vartalaap")): request body, validation, key redaction, in-order playback with stale leftovers dropped, retryable vs non-retryable errors.make check(ruff format, ruff check, mypy strict) and the unit tests pass. No version bumps, per CONTRIBUTING.Measured against the live API (2026-11-08, Mac to Mumbai, warm cache, 8 interleaved iterations)
stream()synthesize()16 concurrent streams for 20 s: 28.4 audio-seconds per wall-second through the plugin vs 28.0 raw, TTFA p95 116 ms vs 103 ms. Full tables in the plugin's development repo (
bench/RESULTS*.md).🤖 Generated with Claude Code